package com.ocom.websocket.feign;

import com.ocom.common.constant.CompanyServiceUrl;
import com.ocom.common.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "company")
public interface CompanyClientService {
    /**
     * 获取单位信息
     * */
    @GetMapping(CompanyServiceUrl.URL_GetCompanyInfo)
    public Result GetCompanyInfo(@RequestParam("comId") Long comId,@RequestParam("comName") String comName,
                                 @RequestParam("agentId")Long agentId,@RequestParam("isAgent")Long isAgent,
                                 @RequestParam("province")String province,@RequestParam("city")String city);


    /**
     * 添加单位
     * */
    @PostMapping(CompanyServiceUrl.URL_AddCompanyInfo)
    public Result AddCompanyInfo(@RequestBody Map<String, Object> map);

    /**
     * 更新单位信息
     *
     * @param map*/
    @PostMapping(CompanyServiceUrl.URL_UpdateCompanyInfo)
    public Result UpdateCompanyInfo(@RequestBody Map<String, Object> map);


    /**
     * 获取管理员用户信息
     * */
    @GetMapping(CompanyServiceUrl.URL_GetMngUserInfo)
    public Result GetMngUserInfo(@RequestParam Long comId,@RequestParam  String userName,@RequestParam  Long role);

//    /**
//     * 获取单位下用户数
//     * */
//    @GetMapping(CompanyServiceUrl.URL_GetCompanyPersonNum)
//    public Result GetCompanyPersonNum(@RequestParam Long comId,@RequestParam  String deptId,@RequestParam  Long status);
//
    /**
     * 添加管理员
     * */
    @PostMapping(CompanyServiceUrl.URL_AddCompanyAdminInfo)
    public Result AddCompanyAdminInfo(@RequestBody Map<String, Object> map);

    /**
     * 更新管理员信息
     *
     * @param map*/
    @PostMapping(CompanyServiceUrl.URL_UpdateMngUserInfo)
    public Result UpdateMngUserInfo(@RequestBody Map<String, Object> map);


    /**
     * 获取升级文件记录(getMjOsVerInfo)
     *
     * @param map*/
    @PostMapping(CompanyServiceUrl.URL_GetMjOsVerInfo)
    public Result GetMjOsVerInfo(@RequestBody Map<String, Object> map);

    /**
     * 保存升级文件记录(addMjOsVerInfo)
     *
     * @param map*/
    @PostMapping(CompanyServiceUrl.URL_AddMjOsVerInfo)
    public Result AddMjOsVerInfo(@RequestBody Map<String, Object> map);


    /**
     * 保存升级文件记录(addMjOsVerInfo)
     *
     * @param map*/
    @PostMapping(CompanyServiceUrl.URL_UpdateMjOsVerInfo)
    public Result UpdateMjOsVerInfo(@RequestBody Map<String, Object> map);


    /**
     * 获取可升级文件版本(getMjOsVerUp)
     *
     * @param map*/
    @PostMapping(CompanyServiceUrl.URL_GetMjOsVerUp)
    public Result GetMjOsVerUp(@RequestBody Map<String, Object> map);


    //获取一个单位信息
    @PostMapping(CompanyServiceUrl.URL_GetCompanyListInfoOne)
    Result GetCompanyListInfoOne(@RequestParam("comId") Long comId);

}
